package com.ericsson.resourceplanner.web;



import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.multipart.MultipartFile;

import com.ericsson.resourceplanner.service.AdminServ;



@Controller
public class AdminControlleImpl implements AdminController{

	@Autowired
	AdminServ adminServ;
	
	@Override
	public void uploadFile(String name, MultipartFile file, int dump_type)
	{
		System.out.println("file name is ::" + name);
		System.out.println("file length is ::" + file.getSize());
		System.out.println("dump_type ::" + dump_type);

		if(dump_type == 2)
		adminServ.uploadFileService(file, name);	
		
		if (dump_type == 3)
			adminServ.fileupload(file, name);
		
		
	}

	public void setAdminServ(AdminServ adminServ) {
		this.adminServ = adminServ;
	}
	
	
}
